package com.example.doctorstation.POJOController;

import com.example.doctorstation.Config.MyResponse;
import com.example.doctorstation.POJOData.*;
import com.example.doctorstation.POJOMapper.*;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
public class PatientReportController {
    @Resource
    PatientReportMapper patientReportMapper;

    @GetMapping(value="/patientreport")
    public MyResponse getAllreport(PatientReport report) {
        try {
            return new MyResponse(patientReportMapper.getPatientReport(), "已获取病人们的医技报告！", "目前没有医技报告");
        } catch (Throwable e) {
            e.printStackTrace();
            return MyResponse.error(e.getMessage());
        }
    }
}
